package com.jgp.service;

import com.jgp.domain.Book;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
public interface BookService {
    /**
     * 添加
     * @param book
     * @return
     */
    public boolean save(Book book);

    /**
     *修改
     * @param book
     * @return
     */
    public boolean updata(Book book);
    /**
     *删除
     * @param id
     * @return
     */
    public boolean delete(Integer id);
    /**
     *按id查询
     * @param id
     * @return
     */
    public Book getbyid(Integer id);

    /**
     * 查询全部
     * @return
     */
    public List<Book> getall();
}
